package com.baiye.template.dao;

import com.baiye.template.pojo.OrderVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * @author GUOZHIPENG
 * @version 1.0
 * @date 2021/9/17 19:18
 */
@Repository
public interface PayDao {
    @Insert("insert into pay(out_trade_no, subject, total_amount, body) VALUES (#{out_trade_no},#{subject},#{total_amount},#{body})")
    int saveOrder(OrderVo orderVo);

    @Update("update pay set `status`=1 where out_trade_no=#{out_trade_no}")
    int finishOrder(String out_trade_no);
}
